<template>
	<view>
		<view class="hander">
			<view class="all">
				<text class="tag">TYPE_ADMIN</text>
			</view>
			<view class="all">
				<text class="tag">TYPE_TEACHER</text>
			</view>
			<view class="all">
				<text class="tag">TYPE_STUDENT</text>
			</view>
		</view>
		<view class="title">
			<text class="biaoti">课程控制器</text>
		</view>
		<view class="kecheng" @click="clickSwitchPanel(0)">
			<view class="biaoqian">
				<view class="lei">查询所有开放课程
					<text :class="panelStatus[0].visible ? 'iconfont icon-zhedie ic-open' :'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">删除课程
					<text :class="panelStatus[0].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">分页查询所有开放课程
					<text :class="panelStatus[0].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">获取某学生注册的课程
					<text :class="panelStatus[0].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">修改课程信息
					<text :class="panelStatus[0].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">获取某老师自己的课程
					<text :class="panelStatus[0].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">查询所有课程
					<text :class="panelStatus[0].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">分页查询所有课程
					<text :class="panelStatus[0].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">教师开放关闭课程
					<text :class="panelStatus[0].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">添加新课程
					<text :class="panelStatus[0].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
		</view>
		<view class="title">
			<text class="biaoti">身份认证控制器</text>
		</view>
		<view class="kecheng" @click="clickSwitchPanel(1)">
			<view class="biaoqian">
				<view class="lei">上传文件
					<text :class="panelStatus[1].visible ? 'iconfont icon-zhedie ic-open' :'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">注册用户
					<text :class="panelStatus[1].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">查询用户存在
					<text :class="panelStatus[1].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">登录
					<text :class="panelStatus[1].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">注销
					<text :class="panelStatus[1].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
		</view>
		<view class="title">
			<text class="biaoti">系统管理员业务</text>
		</view>
		<view class="kecheng" @click="clickSwitchPanel(2)">
			<view class="biaoqian">
				<view class="lei">根据关键词查询用户
					<text :class="panelStatus[2].visible ? 'iconfont icon-zhedie ic-open' :'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">审批用户申请
					<text :class="panelStatus[2].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">禁止用户访问
					<text :class="panelStatus[2].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
			<view class="biaoqian">
				<view class="lei">查看正在申请教师的用户
					<text :class="panelStatus[2].visible ? 'iconfont icon-zhedie ic-open':'iconfont icon-jichu25-zhedie ic-open'"
						@click="clickSwitchOpen"></text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isOpen:false,
				panelStatus: [{
					visible: false
				}, {
					visible: false
				}, {
					visible: false
				}], //用于判断当前数据面板的开关状态
			}
		},
		methods: {
			clickSwitchPanel(index) {
				let now = this.panelStatus[index].visible
				this.panelStatus[index].visible = !now
			},
			clickSwitchOpen() {
				this.isOpen = !this.isOpen
			},
		}
	}
</script>

<style>
	@import url("guanliyonghu.css");
</style>
